import React from 'react'
import { useState } from 'react'
import TestEffect from './components/TestEffect'

export default function App() {
    let [age, setAge] = useState(1) 
    return (
        <div>
            <h3>App</h3>
            <p>App state age: {age}</p>
            <p><button onClick={()=>{
                setAge(age + 1)
            }}>age++</button></p>
            <hr />
            {age % 2 && <TestEffect age={age}/>}
        </div>
    )
}
